//
//  UserConfigViewController.h
//  MapLink
//
//  Created by student on 5/19/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIViewPassValueDelegate.h"
@class AppConfig;
@class OCPromptView;

@interface UserConfigViewController : UIViewController <UITextFieldDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate, UIAlertViewDelegate > {
	NSObject<UIViewPassValueDelegate> * delegate;
	IBOutlet UITextField *textDisplayName;
	IBOutlet UITextField *textAuthCode;
	IBOutlet UIImageView *imgView;
	IBOutlet UILabel *labelStatus;
	IBOutlet UIActivityIndicatorView *activityIndicatorView;
	AppConfig* appConfig;
	
	UIAlertView *msg;
	OCPromptView *input;
	
	NSString *displayName;
	
	IBOutlet UIButton *saveButton;
	
	NSString *deviceID;
	BOOL changed;
	BOOL cameraUsed;
	
	NSMutableData *buffer;
	NSURLConnection *conn;
}
@property(nonatomic, retain) NSObject<UIViewPassValueDelegate> * delegate;
@property(nonatomic, retain) NSString *displayName;

@property (nonatomic, retain) IBOutlet UIImageView *imgView;
@property (nonatomic, retain) NSString *deviceID;
@property (nonatomic, retain) NSMutableData *buffer;

-(id) initWithAppConfig:(AppConfig *) object withDeviceID:(NSString *)string;
-(IBAction) save;
-(IBAction) cancel;
//-(IBAction) getPhoto;
-(IBAction) pickImage: (id) sender;
-(IBAction) takePhoto: (id) sender;


-(void) dismissAlert;
-(void) promptAuthenticationReEnter;
-(void) informMismatchAuthentication;

@end
